package shuxue;

import java.util.Scanner;

/**
 *  2992D   22
 */

public class Sky {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		
		if(getSum(a,10) == getSum(a,12) && getSum(a,10) == getSum(a,16)) {
			System.out.println(a + " is a Sky Number.");
		}else {
			System.out.println(a + " is not a Sky Number.");
		}
		
		
	}
	
	/**
	 * 计算数字各个位置数字之和
	 * @param n 输入的整数 2992 22  "1011"
	 * @param r 进制数
	 * @return
	 */
	public static int getSum(int n, int r) {
		int sum = 0;
		
		while(n>0) {
			sum = sum + n%r;
			n=n/r;
		}
		return sum;		
	}
	
	
}
